package com.atguigu.gulimall.seckill.scheduled;

import lombok.extern.slf4j.Slf4j;
import org.springframework.scheduling.annotation.Async;
import org.springframework.scheduling.annotation.Scheduled;


/**
 * @create: 2024/9/15
 * @author: gyhe10
 * @description: 测试 Spring Boot 定时任务
 **/


@Slf4j
// @Component
// @EnableAsync
// @EnableScheduling
public class HelloSchedule {

    @Async
    @Scheduled(cron = "* * * ? * *")
    public void hello() throws InterruptedException {
        log.info("hello...");
        Thread.sleep(5000);
    }
}
